package com.imoney.payment.member.generator;

import java.util.List;

import org.springframework.stereotype.Service;

import com.imoney.framework.base.entity.IRequest;
import com.imoney.payment.generator.AbstractGenerator;
import com.imoney.payment.member.domain.Addr;
import com.imoney.payment.member.domain.RegCompleteRequest;
import com.imoney.payment.member.enums.AddrType;

/**
 * 类说明：<br>
 * 
 * <p>
 * 详细描述：<br>
 * 
 * </p>
 * 
 * <pre>
 * ——————————————————————————————————————————————————————————————————
 * |		修改人		|		修改时间			|		修改原因
 * ——————————————————————————————————————————————————————————————————
 * |	zengxx 曾宪新	|		2013-6-16		|	
 * ——————————————————————————————————————————————————————————————————
 * </pre>
 * 
 * @author zengxx 曾宪新(Xavier.zeng)
 * 
 *         CreateDate: 2013-6-16
 */
@Service
public class AddrGenerator extends AbstractGenerator<Addr> {
	

	@Override
	public Addr generate(IRequest request) {
		RegCompleteRequest regRequest = (RegCompleteRequest) request;
		
		Addr addr = new Addr();
		addr.setLinkMan(regRequest.getRealName());
		addr.setProv(regRequest.getProv());
		addr.setCity(regRequest.getCity());
		addr.setArea(regRequest.getCounty());
		addr.setAddr(regRequest.getAddress());
		addr.setAddrType(AddrType.RECADDR);
		addr.setDefaultAddr("1");
		
		return addr;
	}

	@Override
	public List<Addr> generateList(IRequest request) {

		return null;
	}

}
